package com.zabra.zl.ui.index_fragment.index.fragment.informationcenter;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.jwenfeng.library.pulltorefresh.PullToRefreshLayout;
import com.zabra.zl.R;
import com.zabra.zl.base.BaseFragment;
import com.zabra.zl.ui.index_fragment.index.fragment.dayhot.DayHotAdapter1;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

public class InformationCenter extends BaseFragment {
    @BindView(R.id.recycler)
    RecyclerView recycler;
    @BindView(R.id.refresh)
    PullToRefreshLayout refresh;
    private List<String> list = new ArrayList<>();
    private DayHotAdapter1 adapter;

    @Override
    protected void initView(View view) {
        for (int i = 1; i < 10; i++) {
            list.add("数据----" + i);
        }
        refresh.setCanRefresh(false);
        recycler.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
        adapter = new DayHotAdapter1(R.layout.item_dayhot1, list);
        recycler.setAdapter(adapter);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.layout_list_conment;
    }
}
